﻿using Prism.Events;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Prismx.Cool
{
    /// <summary>
    /// 订阅消息特性
    /// </summary>
    [SkipScan, AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
    public class SubscribeMessageAttribute : Attribute
    {
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="messageId"></param>
        /// <param name="type"></param>
        public SubscribeMessageAttribute(string messageId, Type type)
        {
            MessageId = messageId;
            Type= type;
        }

        /// <summary>
        /// 消息Id
        /// </summary>
        public string MessageId { get; set; }
        public Type Type { get; set; }
    }
}
